package com.joney.website.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.joney.website.entity.User;
import com.joney.website.mapper.UserMapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author joney
 * @since 2018-11-13
 */
@Service
public class UserService extends ServiceImpl<UserMapper, User>{

    public User findByLoginName(String loginName){
        EntityWrapper<User> wrapper = new EntityWrapper<>();
        User temp = new User();
        temp.setLoginName(loginName);
        wrapper.setEntity(temp);
        return selectOne(wrapper);
    }

}
